#include "CRectangle.h"

Rectangle::Rectangle() :w(3), h(10){

}

Rectangle::Rectangle(double w, double h){
	this->w = w;
	this->h = h;
}

Rectangle::Rectangle(const Rectangle & rect){
	this->w = rect.getWidth();
	this->h = rect.getHeight();
}

Rectangle::~Rectangle(){

}

double Rectangle::getArea() const{
	return w*h;
}

double Rectangle::getWidth() const{
	return w;
}

void Rectangle::setWidth(double w){
	this->w = w;
}

double Rectangle::getHeight() const{
	return h;
}

void Rectangle::setHeight(double h){
	this->h = h;
}

const Rectangle & Rectangle::operator--(){
	--w;
	--h;
	return *this;
}